Audio documents

Most documents hold textual knowledge that is split into chunks and retrieved to ground the agent's responses. An audio document is different: it stores one or more pre-recorded audio files for playback during a call, and is not split into chunks or used for retrieval.

Audio documents are referenced by name and used to:

Playing a recording instead of synthesizing speech reduces TTS usage and cost, and avoids mispronunciation of known, fixed phrases.

Preparing the audio files

Uploading the files as a document

  1. In the Navigation pane, expand AI Agents, and then click Documents.
  2. Click Add new document.
  3. In the Name field, enter a unique name (up to 32 characters; letters, digits, or underscores only). This is the name you reference when playing the audio.
  4. Select Upload File, then click Upload file. In the file picker, change the file-type selector to All files so that .wav / .pcm files become selectable, and choose the audio files you prepared (and, optionally, their transcript files).
  5. Click Create.

How files within a document are selected

Transcript files

Alongside the recordings, you can upload a transcript of each audio file – the text that the recording speaks. When the file is played – from a Flow Say node's audio playback or an agent's prerecorded_audio playback – its transcript appears in the conversation log alongside the played audio, so you can see what each recording said.

Two formats are supported:

Upload the transcript files together with the recordings (in the file picker, use the All files type so that .txt / .json files are selectable). The info pane's View action shows a transcript file's actual content.

Audio documents are not split into chunks and must not be added to the Documents tab of an Agent or Flow. Reference them only by name – in a flow #play_* directive or in the prerecorded_audio parameter.